﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.IO;
using System.Runtime.Serialization;
using System.ServiceModel.Channels;

namespace WMIService
{
    [DataContract]
    public class Data
    {
        public string data { get; set; }
    }


    [ServiceContract]
    public interface IService
    {
        // TODO
        // Endpoint Config Scheduler JS+HTML
        [OperationContract]
        [WebGet(UriTemplate = "/")]
        Stream Help();

        [OperationContract]
        [WebGet(UriTemplate = "/GetAllClasses")]
        Stream GetWMIInfo();

        [OperationContract]
        [WebGet(UriTemplate = "/GetClassesByQuery")]
        Stream GetClassesByQuery();

        [OperationContract]
        [WebGet(UriTemplate = "/GetScheduledClasses")]
        Stream GetScheduledClasses();

        [OperationContract]
        [WebGet(UriTemplate = "/ConfigureScheduler")]
        Stream ConfigureScheduler();

        [OperationContract]
        [WebInvoke(Method = "POST", UriTemplate = "/SaveXML", RequestFormat = WebMessageFormat.Xml, ResponseFormat = WebMessageFormat.Xml, BodyStyle = WebMessageBodyStyle.Wrapped)]
        Stream SaveXML(Message message);

        [OperationContract]
        [WebInvoke(Method = "POST", UriTemplate = "/GetXMLDocument", ResponseFormat = WebMessageFormat.Xml)]
        Stream GetXMLDocument(Message message);
    }
}
